There's a chance your friend isn't acting out of malice or sheer calculation.
It may well be that the individual you are referring to is so damaged that they're simply operating out of self-preservation. By cloaking distance with charm and witty repartee, your friend is simply trying to fulfill their human need for social interaction whilst remaining emotionally secluded in safety.
You cannot get hurt when the people around you aren't psychologically close enough to hurt you.
You're dealing with a very broken individual, @Coded Logic. I know this because you may as well have been writing about me.